package ui;

import java.io.FileNotFoundException;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.transition.Transition;

public class GameWindowContainer extends AppGameContainer {
	public static final int finalLevel = 5;
	public GameWindowContainer(org.newdawn.slick.Game game) throws SlickException {
		super(game);
	}

	public static void main(String[] args) throws SlickException, FileNotFoundException {
		GameStateSwitcher gameStates = new GameStateSwitcher("FSMGS");
		GameWindowContainer app = new GameWindowContainer(gameStates);
		
		app.setDisplayMode(800, 800, false);
		app.setVSync(true);
		app.start();
		gameStates.enterState(1);
		
	}
	
	public void enterState(int stateID, Transition exitTransition, Transition enterTransition){
		((GameStateSwitcher)this.game).enterState(stateID, exitTransition, enterTransition);
	}
	
	public void loadLevel(String levelName) throws SlickException {
		((GameStateSwitcher)this.game).loadLevel(levelName, false);
	}
	
	public void setHeight(int height) {
		this.height = height;
	}
	
	public void setWidth(int width) {
		this.width = width;
	}
}
